<div id="form"></div>
<script>
var frm=$("##form").ajajform({
	header: "Редактирование новости",
	submit: {
		url: '#action#',
		value: "Сохранить",
		ajaj: true,
		params: {mode: "save",news_id: '#Q:news_id#',ajaj: 1}
	}
});
frm.ajajform("insertWidget",null,null,{
	type: "textedit",
	name: "name",
	label: "Название",
	width: 600,
	value: "#JS:news/name#",
	validate: function(x) {	if (!x || x.length==0) return "Пустое название";}
});
frm.ajajform("insertWidget",null,null,{
	type: "date",
	name: "date_use",
	label: "Дата",
	value: "#news/date_use#"
});
frm.ajajform("insertWidget",null,null,{
	type: "textedit",
	name: "tags",
	label: "Теги, через запятую",
	width: 600,
	value: "#JS:news/tags#"
});
var t1=frm.ajajform("insertWidget",null,null,{
	type: "textareaedit",
	name: "abstract",
	label: "Заголовок",
	width: 600,
	height: 250,
	value: "#JS:news/abstract#",
	wysiwyg: true
});
var t2=frm.ajajform("insertWidget",null,null,{
	type: "textareaedit",
	name: "body",
	label: "Тело",
	width: 600,
	height: 400,
	value: "#JS:news/body#",
	wysiwyg: true
});
//setTimeout(function() {t1.ajajform_textareaedit("option","wysiwyg",true);t2.ajajform_textareaedit("option","wysiwyg",true);},10);
</script>
